package com.source.lightfowl.VO;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.UpdateTimestamp;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/*
条码发放
 */
@Data
public class Barcode_GrantVO {
    @Id
    @GenericGenerator(name = "Barcode-Grant-uuid", strategy = "uuid")
    @GeneratedValue(generator = "Barcode-Grant-uuid")
    private String id;
    private String barcodeId;//条形码编号（预留字段）
    private String stallsId;//发放档口编号
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd",timezone = "GMT-8")
    private Date grantDate;//发放时间
    private String grantPerson; //发放人员id
    private String receivePerson; //领取人员id
    private Integer grantCount;//发放数量
    private String startNumber;//开始编号
    private String endNumber;//结束编号
    private String createBy;//创建者（发放人员）
    @Temporal(TemporalType.TIMESTAMP)
    @CreationTimestamp
    @Column(nullable=false,updatable = false)
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT-8")
    private Date createDate;//创建时间
    @Temporal(TemporalType.TIMESTAMP)
    @UpdateTimestamp
    @Column(nullable=true,insertable=false)
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT-8")
    private Date updateDate;//更新时间

    //youhua
    private String deliverName; //发放人员
    private String getName; // 领取人员姓名

    private String stallsName; //档口名
    private String createName; //





}
